package com;

import java.net.Socket;
import java.util.Scanner;

public class h2 {
    public static void main(String[] args)throws Exception{
        Socket client=new Socket("localhost",9999);
        Scanner scanner=new Scanner(client.getInputStream());
        if(scanner.hasNextLine()){
            System.out.println("【HelloClient】服务器端返回："+scanner.nextLine());
        }
        client.shutdownOutput();
        client.close();
    }
}
